#include <stdio.h>

int sum(int n);
int sum(int n)
{
   int result =0;
   do
   {	   
     result += n;
   }	     
   while (n-- >0); 

   return result;

}
int main()
{
   int n,result;	
   printf("n:");
   scanf("%d",&n);
   result = sum(n);
   printf("sum=%d\n",result);
   return 0;
}	
